#include "../include/association.h"

int main()
{
    int n = 5;
    int m = 3;
    float cost_mat[] = {1.22113235, 0.37001809, 1.1052933,
       0.75052791,  0.57570027,  0.45785809,
       0.19764054, 0.82615722,  0.2961592,
       0.64924784, 0.78442321, 0.04409391,
       0.8326353 ,0.41589311, 0.42825931};
    
    Eigen::MatrixXf cost_matrix = Eigen::Map<Eigen::Matrix<float,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor> >(cost_mat,n,m);
    Eigen::MatrixXf trm = cost_matrix.transpose();
    std::vector<int> row_ids;
    std::vector<int> col_ids;
    hitcrt::KMAssociation assoc;
    assoc.associate(trm,row_ids,col_ids);
    std::cout<<"result:"<<cost_matrix<<std::endl;
    for (int i=0;i<row_ids.size();i++)
    {
        std::cout<<"["<<row_ids[i]<<"\t"<<col_ids[i]<<"]"<<std::endl;
    }    
    return 0;
}